﻿/**
 * 表单的关闭功能。
 */
Ext.define('Happy.form.action.Close', {
    extend: 'Happy.Action',
    alias: 'action.close',

    /**
     * @inheritdoc
     */
    defaultConfig: {
        itemId: 'close',
        iconCls: 'close-button',
        text: '关闭',
        containerSelector: 'window'
    },

    /**
     * @inheritdoc
     */
    onClickHandler: function (button) {
        var me = this;

        me.up(button, me.initialConfig.containerSelector).close();
    }
});